﻿using System;
using System.Collections.Generic;

using System.Text;
using System.Globalization;

namespace ILOG.J2CsMapping.Util
{
    public class LocaleHelper
    {

        private static string ParseIETFForVariant(string p)
        {
            return "";
        }

        private static string ParseIETFForCountry(string p)
        {
            if (p.Length > 2)
            {
                if (p[2] == '-')
                {
                    return p.Substring(3);
                }
                else
                {
                    return "";
                }
            }
            else
            {
                return "";
            }
        }

        private static string ParseIETFForLanguage(string p)
        {
            return p.Substring(0, 2);
        }

    

        private static string BuildIETFTag(string language, string country, string variant)
        {
            String ietfTag = language;
            if (country != null && !country.Equals(""))
            {
                ietfTag += "-" + country;
            }
            return ietfTag;
        }


    }
}
